package com.baizan.daka.ui.dialog

import android.app.Dialog
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.widget.TextView
import com.dianzan.daka.R

class LoadingDialog : Dialog {
    var contentTv: TextView? = null

    constructor(context: Context) : super(context, R.style.LoadingDialog) {
        setCancelable(true)
        setCanceledOnTouchOutside(false)

        val inflater = LayoutInflater.from(context)
        val view: View = inflater.inflate(R.layout.dialog_loading, null)
        contentTv = view.findViewById<TextView>(R.id.text_view)
        setContentView(view)
    }

    fun setDialogLabel(label: String) {
        contentTv?.text = label
    }
}